home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 101 / CD-ROM 101.iso / compl / maya5ple / Install_MayaPLE5_English.exe / Maya / Data1.cab / initHelp.mel < prev    next >
Encoding:
Text File  |  2003-07-17  |  2.5 KB  |  73 lines

  1. // Copyright (C) 1997-2002 Alias|Wavefront,
  2. // a division of Silicon Graphics Limited.
  3. //
  4. // The information in this file is provided for the exclusive use of the
  5. // licensees of Alias|Wavefront.  Such users have the right to use, modify,
  6. // and incorporate this code into other products for purposes authorized
  7. // by the Alias|Wavefront license agreement, without fee.
  8. //
  9. // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  10. // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  11. // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  12. // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  13. // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  14. // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  15. // PERFORMANCE OF THIS SOFTWARE.
  16. //
  17. //
  18. //  Alias|Wavefront Script File
  19. //  MODIFY THIS AT YOUR OWN RISK
  20. //
  21. //  Creation Date:  Nov 25 1998
  22. // 
  23. //  Description:
  24. //        Supports the help menus.
  25. //        Initializes context sensitive help.
  26. //        Supports popup help.
  27. //
  28. {
  29.     source "ContextHelp.mel";
  30.  
  31.     // Set the popup Help preference mode.
  32.     if (!`optionVar -exists popUpHelpMode`) {
  33.         optionVar -iv popUpHelpMode on;
  34.     }
  35.     help -popupMode `optionVar -q popUpHelpMode`;
  36.     help -rolloverMode on;
  37. }
  38.  
  39. global proc checkHelpPrefs(string $inLanguage) {
  40.  
  41.     string $helpLanguage = `optionVar -query "helpLanguage"`;
  42.     
  43.     if ($helpLanguage == $inLanguage){
  44.         showHelp -docs index.html;
  45.     } else {
  46.         string $languageStr = "English";
  47.         string $imageName = "helpLangSetup_en.xpm";
  48.         if($inLanguage == "ja_JP") {
  49.             $languageStr = "Japanese";
  50.             $imageName = "helpLangSetup_jp.xpm";
  51.         }
  52.         
  53.         string $msgStr1 = "Your online help language selection is not set to " + $languageStr + ".";
  54.         string $msgStr2 = "Please click the button below to open the Preferences window and change the setting.";
  55.         
  56.         string $msgWindow = `window -title "Help" -sizeable false`;
  57.         
  58.         columnLayout -adjustableColumn true -columnAttach "both" 10;
  59.         separator -style "none" -height 5;
  60.         picture -image $imageName;
  61.         separator -style "single" -height 10;
  62.         text -label $msgStr1 -align "center";
  63.         text -label $msgStr2 -align "center";
  64.         separator -style "none" -h 20;
  65.         button -label "Change Language Preference" -command ("deleteUI -window " + $msgWindow + "; preferencesWnd \"misc\";");
  66.         
  67.         if(`about -mac`) {
  68.             window -edit -width 350 -height 240 $msgWindow;
  69.         }
  70.         showWindow $msgWindow;
  71.     }
  72. }
  73.